home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / No68kHere / No68kHere Read Me.txt < prev   
Text File  |  1995-06-27  |  2KB  |  38 lines

  1. ;    No68kHere - puts up an alert with a Quit button.  Used to post an alert
  2. ;    if a PPC-only program is started on a 68K machine.  (NO machine testing: does
  3. ;    the same thing if run in emulation on a PowerMac (a file with no cfrg resource)).
  4. ;    Should add < 200 bytes total size to your program, compared to at least 2K for
  5. ;    the smallest possible C version.
  6. ;
  7. ;    Should work on any Mac, 128K on up.  Simply copy the resource fork to your
  8. ;    application (most development systems do this automatically).  You can also
  9. ;    do it manually with Resedit or use a Rez/Resorcerer final build script.
  10. ;    This effectively creates a fat binary, whose 68K version exists only to
  11. ;    notify the user that a PPC is required.
  12. ;
  13. ;    You can supply any ALRT desired (simple default model provided).  Alert must
  14. ;    have ID = 9999, and an enabled item to dismiss with.  (ALRT ID is hard coded
  15. ;    but changeable:  look for $03E7 in CODE 1).
  16. ;
  17. ;    DO NOT modify or reuse this code unless you totally understand it!
  18. ;    No68kHere was designed to be as small as possible, and it does
  19. ;    several things (to save space) that would be disastrous in a "real" app.
  20. ;
  21. ;    No68kHere is free to anyone who can use it.  It appears stable and no problems
  22. ;    have been reported, but the author makes no promises.  Test your own app or die!
  23. ;
  24. ;    Source code is provided for the interested - again, do not use this
  25. ;    as an example of good Assembly language style.
  26. ;
  27. pea       -$1E00(sp)        ; shove the GrafPort on the stack. (NOT normally recommended)
  28. _InitGraf                ; Minimum Init calls determined empirically
  29. _InitFonts
  30. _InitWindows
  31. clr.l     -(sp)          ; No restartProc
  32. _InitDialogs
  33. move.w    #$03E7,-(sp)    ; parameters for _Alert
  34. clr.l     -(sp)
  35. _Alert 
  36. _ExitToShell                ; ignore _Alert return value
  37. ;
  38. ;    Comments/complaints:  feel free to email PaulS101@aol.com or PaulS101@gate.ioa.com